<div class="form">

<?php
$form = $this->beginWidget('CActiveForm', array (
	'id' => 'book-form',
	'enableAjaxValidation' => false,

	
));
?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'id_book_category'); ?>
		<?php echo $form->textField($model,'id_book_category'); ?>
		<?php echo $form->error($model,'id_book_category'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'title'); ?>
		<?php echo $form->textField($model,'title',array('size'=>60,'maxlength'=>1000)); ?>
		<?php echo $form->error($model,'title'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'introtext'); ?>
		<?php echo $form->textArea($model,'introtext',array('rows'=>6, 'cols'=>50)); ?>
		<?php

			$CKEditor = new CKEditor();
			$CKEditor->replace("Book_introtext", "<p>KING BOOK</p>");
		?>
		<?php echo $form->error($model,'introtext'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'image'); ?>
		<?php echo $form->textField($model,'image',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'image'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'published_price'); ?>
		<?php echo $form->textField($model,'published_price'); ?>
		<?php echo $form->error($model,'published_price'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'sale_price'); ?>
		<?php echo $form->textField($model,'sale_price'); ?>
		<?php echo $form->error($model,'sale_price'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'year_released'); ?>
		<?php echo $form->textField($model,'year_released'); ?>
		<?php echo $form->error($model,'year_released'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'date_upload'); ?>
		<?php echo $form->textField($model,'date_upload'); ?>
		<?php echo $form->error($model,'date_upload'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'date_modified'); ?>
		<?php echo $form->textField($model,'date_modified'); ?>
		<?php echo $form->error($model,'date_modified'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'id_user_upload'); ?>
		<?php echo $form->textField($model,'id_user_upload'); ?>
		<?php echo $form->error($model,'id_user_upload'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'deleted'); ?>
		<?php echo $form->textField($model,'deleted'); ?>
		<?php echo $form->error($model,'deleted'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->